// pages/intro/intro.js
let app = getApp()
let CODE_SRC = app.globalData.CODE_SRC
Page({

  /**
   * 页面的初始数据
   */
  data: {
    CODE_SRC,
    arr: [
      {
        name: '嵌入式',
        photos: [
          {
            src: 'https://7761-wang2023-5gng88vf3d3ea81f-1256272801.tcb.qcloud.la/tool/lot_tool.png?sign=d4714f010d65b55ba0b730c3f72fcd6d&t=1697220119'
          },
        ],
        index: 0,
        type: '嵌入式',
        text: `     
          Soucelnsight,
          Visual studio Code,
          MobaXterm,
          beyond Compare,
          Qt ,
          VMware
        `,
        tools: [
          'Soucelnsight',
          'Visual studio Code',
          'MobaXterm',
          'beyond Compare',
          'Qt',
          'VMware'
        ]
      },
      {
        name:"h5",
        photos: [
          {
            src:'https://7761-wang2023-5gng88vf3d3ea81f-1256272801.tcb.qcloud.la/tool/h5_tool2222.png?sign=7f0f8b0473de67144def639410770567&t=1697219830'
          }
        ],
        index: 1,
        type: 'h5',
        text:`
        Visual studio Code,
        Sublime Text3,
        Hbuilder,
        WebStorm,
        Nodejs,
        微信开发者工具`,
        tools: [
          'Visual studio Code',
          'Sublime Text3',
          'Hbuilder',
          'WebStorm',
          'Nodejs',
          '微信开发者工具'
        ]
      },{
        name: 'java',
        photos: [
          {
            src: 'https://7761-wang2023-5gng88vf3d3ea81f-1256272801.tcb.qcloud.la/tool/java_tool.png?sign=983ef9277d3a0a7fa91894919698286f&t=1697219949',
          }
        ],
        index: 2,
        type: 'java',
        text: `
        Eclipse,
        JDk,
        MyEclipse,
        NetBeans,
        Jbuilder软件,
        WebStorm`,
        tools: [
          'Eclipse',
          'JDk',
          'MyEclipse',
          'NetBeans',
          'Jbuilder软件',
          'WebStorm'
        ]
      },{
        name: 'php',
        photos: [
          {
            src: 'https://7761-wang2023-5gng88vf3d3ea81f-1256272801.tcb.qcloud.la/tool/php_tool.png?sign=4560ba8a5b07f77eddcd173131cf049b&t=1697219911'
          }
        ],
        index:3,
        type: 'php',
        text: `
          Visual Studio Code,
          phpStorm,
          Phpstudy,
          wamp
        `,
        tools: [
          'Visual Studio Code',
          'phpStorm',
          'Phpstudy',
          'wamp'
        ]
      }
      ,{
        name: 'python',
        photos: [
          {
            src:'https://7761-wang2023-5gng88vf3d3ea81f-1256272801.tcb.qcloud.la/tool/python_tool.png?sign=d4896b67170042d39de2fb17f9d927f9&t=1697219871'
          }
        ],
        index:4,
        type: 'python',
        text: `  
        IDLE,
        Visual Studio Code,
        Vim,
        Sublime Text,
        Spuder,
        Pycharm,
        jupyter noteboo,
        Atom,
        Anaconda
        `,
        tools: [
        'IDLE',
        'Visual Studio Code',
        'Vim',
        'Sublime Text',
        'Spuder',
        'Pycharm',
        'jupyter noteboo',
        'Atom',
        'Anaconda'
        ]
      },
      {
        name: '网络工程',
        photos: [
          {
            src:'https://7761-wang2023-5gng88vf3d3ea81f-1256272801.tcb.qcloud.la/tool/net_tool.png?sign=6ea4bf5b9c6f9baf92af4043d9483811&t=1697219934'
          }
        ],
        index:5,
        type: 'net',
        text: `    
          Processon,
          SecureCRT,
          Xshell,
          Wireshark,
          VMware虚拟机,
          进制转换器,
          子网计算器,
          HCL,
          Mobaxterm
        `,
        tools: [
          'Processon',
          'SecureCRT',
          'Xshell',
          'Wireshark',
          'VMware虚拟机',
          '进制转换器',
          '子网计算器',
          'HCL',
          'Mobaxterm'
        ]
      }
    ]
  },
  onPreviewTap: function(event) {
    var src = event.currentTarget.dataset.src
    let newArr = this.data.arr.map(item=>item.src)
    wx.previewImage({
      current: src,
      urls: newArr
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    if(options){
      let index = options.index;
      let type = options.type;
      if(index){
        this.setData({index})
      }
      if(type){
        this.setData({type})
      }
    }
    wx.showLoading({
      title: '正在加载...',
      icon: 'none'
    })
    setTimeout(()=>{
      wx.hideLoading();
    },500)
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})